From: Florian Müllner Date: Wed, 9 Jun 2021 23:55:31 +0000 (+0200) Subject: lookingGlass: Only pop modal after the transition X-Git-Tag: archive/raspbian/50.5-1+rpi1~1^2~574^2^2~260 X-Git-Url: https://dgit.raspbian.org/%22http://www.example.com/cgi/%22/%22http:/www.example.com/cgi/%22?a=commitdiff_plain;h=5be67eb1907afd81c60b89145f53be19f416ba79;p=gnome-shell.git lookingGlass: Only pop modal after the transition Right now we pop the modal immediately when closing, so the key-release event of the Escape key ends up in the focus window which may consume it for leaving fullscreen mode or similar. We can avoid that in many cases by keeping the modal grab until the end of the transition, as the key-release event will then likely occur while the grab is still in place (provided animations are enabled). Part-of: --- diff --git a/js/ui/lookingGlass.js b/js/ui/lookingGlass.js index a9f0512db..61d17b7d0 100644 --- a/js/ui/lookingGlass.js +++ b/js/ui/lookingGlass.js @@ -1368,8 +1368,6 @@ class LookingGlass extends St.BoxLayout { this.setBorderPaintTarget(null); - Main.popModal(this._entry); - let settings = St.Settings.get(); let duration = Math.min(LG_ANIMATION_TIME / settings.slow_down_factor, LG_ANIMATION_TIME); @@ -1377,7 +1375,10 @@ class LookingGlass extends St.BoxLayout { y: this._hiddenY, duration, mode: Clutter.AnimationMode.EASE_OUT_QUAD, - onComplete: () => this.hide(), + onComplete: () => { + Main.popModal(this._entry); + this.hide(); + }, }); }